From: Ian Campbell Date: Wed, 3 Feb 2016 10:43:47 +0000 (+0000) Subject: tools: xenconsole: cleanup when clock_gettime fails. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1822 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/%22bookmarks://%22Dat/%22http:/www.example.com/cgi/%22https:/%22bookmarks:/%22Dat?a=commitdiff_plain;h=5e403ca3da791bf2a6001d1fc3d7def180c0e439;p=xen.git tools: xenconsole: cleanup when clock_gettime fails. All other error paths in the infinite loop in handle_io use break, so as to free resources. CID: 1351226 Signed-off-by: Ian Campbell Acked-by: Wei Liu --- diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c index e2e7a6b242..34666c43ab 100644 --- a/tools/console/daemon/io.c +++ b/tools/console/daemon/io.c @@ -1053,7 +1053,7 @@ void handle_io(void) POLLIN|POLLPRI); if (clock_gettime(CLOCK_MONOTONIC, &ts) < 0) - return; + break; now = ((long long)ts.tv_sec * 1000) + (ts.tv_nsec / 1000000); /* Re-calculate any event counter allowances & unblock